package com.xli.mis.codemain.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xli.mis.codemain.entity.CodeMain;
import jakarta.validation.constraints.NotNull;

import java.util.List;

public interface ICodeMainService extends IService<CodeMain> {

    boolean insert(@NotNull CodeMain codeMain);

    boolean delete(@NotNull Long id);

    boolean update(@NotNull CodeMain codeMain);

    CodeMain find(@NotNull Long id);

    List<CodeMain> findList(@NotNull QueryWrapper<CodeMain> qw);

    Page<CodeMain> findList(@NotNull QueryWrapper<CodeMain> qw, @NotNull long current, @NotNull long size);

    CodeMain findCodeMainByName(@NotNull String name);

    Long getCodeIdByName(@NotNull String codeName);
}
